package com.aioserver.socketserver.aioserver;

import java.nio.charset.Charset;
import net.lb.socketserver.transfer.server.ServerConfig;
import net.lb.socketserver.transfer.server.ServerMain;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.junit.AfterClass;
import org.junit.BeforeClass;

public class BaseTestSupport
{
    protected Logger            logger     = LogManager.getLogger();
    protected static ServerMain serverMain = null;
    protected Charset           charset    = Charset.forName("utf-8");
    
    @BeforeClass
    public static void before()
    {
        ServerConfig serverConfig = new ServerConfig();
        serverConfig.setPort(80);
        serverMain = new ServerMain(serverConfig);
        serverMain.start();
    }
    
    @AfterClass
    public static void after()
    {
        serverMain.stop();
    }
}
